package com.my.webhr.pro.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.my.webhr.pro.mapper.EmployeeMapper;
import com.my.webhr.pro.pojo.Employee;
import com.my.webhr.pro.service.EmployeeService;
@Service
public class EmployeeServiceImpl implements EmployeeService {
	@Autowired
	private EmployeeMapper employeeMapper;
	@Override
	public Employee selectById(int id) {
		return employeeMapper.selectByPrimaryKey(id);
	}
	@Override
	public List<Employee> selectAll() {
		return employeeMapper.selectAll();
	}
	@Override
	public Employee selectPlus(int id) {
		return employeeMapper.selectPlus(id);
	}
	@Override
	public List<Employee> selectHoliday() {
		return employeeMapper.selectHoliday();
	}
	@Override
	public List<Employee> selectLeaveInfo() {
		return employeeMapper.selectLeave();
	}
	@Override
	public List<Employee> selectSalaryInfo() {
		return employeeMapper.selectSalary();
	}
	@Override
	public List<Employee> selectByNameE(Employee employee) {
		return employeeMapper.selectByNameE(employee);
	}
	@Override
	public List<Employee> selectByNameH(Employee employee) {
		return employeeMapper.selectByNameH(employee);
	}
	@Override
	public List<Employee> selectByNameS(Employee employee) {
		return employeeMapper.selectByNameS(employee);
	}
	@Override
	public int deleteOne(int eId) {
		return employeeMapper.deleteByPrimaryKey(eId);
	}
	@Override
	public int modifyOne(Employee employee) {
		return employeeMapper.updateByPrimaryKeySelective(employee);
	}
	@Override
	public int updateOne(Employee employee) {
		return employeeMapper.insertSelective(employee);
	}
	

}
